package org.gcb.core;

import java.util.HashMap;
import java.util.HashSet;
import org.gcb.core.model.Armor;
import org.gcb.core.model.EArmorSlot;
import org.openide.util.ImageUtilities;

/**
 * Class uses as a temporary testing store for armor items
 * @author Jason
 */
public class SampleArmor extends HashMap<String, Armor>{
    private static SampleArmor me = new SampleArmor();
    private SampleArmor() {
        Armor basicCloth = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_chest_cloth_21.jpg")), "Cloth armor", "Basic clothing", 4.0, EArmorSlot.ARMOR, 0, 0, 0);
        Armor feyCloth = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_chest_cloth_74.jpg")), "Feyweave", "Not sure.", 5.0, EArmorSlot.ARMOR, 1, 0, 0);
        Armor starCloth = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_chest_chain_03.jpg")), "Starweave", "Nothing", 3.0, EArmorSlot.ARMOR, 2, 0, 0);
        Armor scale = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_chest_chain.jpg")), "Scale", "You'll look like a fish.", 45.0, EArmorSlot.ARMOR, 7, 0, 1);
        Armor plate = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_chest_plate03.jpg")), "Plate", "Plate armor is the thickest of the basics.", 50.0, EArmorSlot.ARMOR, 8, 2, 1);
        Armor lightShield = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_shield_09.jpg")), "Light Shield", "What is this, Cardboard?", 6.0, EArmorSlot.ARMS, 1, 0, 0);
        Armor heavyShield = new Armor(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/gcb/core/resources/inv_shield_66.jpg")), "Heavy Shield", "Hefty Hefty Hefty!", 15.0, EArmorSlot.ARMS, 2, 2, 0);
        put(basicCloth.getText(), basicCloth);
        put(feyCloth.getText(), feyCloth);
        put(starCloth.getText(), starCloth);
        put(scale.getText(), scale);
        put(plate.getText(), plate);
        put(lightShield.getText(), lightShield);
        put(heavyShield.getText(), heavyShield);
    }

    public static SampleArmor instance() {
        if (me==null) {
            me = new SampleArmor();
        }
        return me;
    }
}
